home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group93c.txt
/
000013_icon-group-sender _Tue Jul 20 10:03:18 1993.msg
< prev
next >
Wrap
Internet Message Format
|
1994-02-02
|
1KB
Received: by cheltenham.cs.arizona.edu; Tue, 20 Jul 1993 13:43:46 MST
Message-Id: <9307201701.AA31350@enlil.premenos.sf.ca.us>
From: Ken Walker <kwalker@shara.premenos.sf.ca.us>
Subject: Re: Mystery about "every"
To: icon-group@cs.arizona.edu
Date: Tue, 20 Jul 93 10:03:18 PDT
In-Reply-To: <705767@MTS.cc.Wayne.edu>; from "Paul_Abrahams@MTS.cc.Wayne.edu" at Jul 20, 93 11:00 am
Mailer: Elm [revision: 66.25]
Status: R
Errors-To: icon-group-errors@cs.arizona.edu
> Paul_Abrahams@MTS.cc.Wayne.edu writes
>
> ...
> This program produced the output 83, as expected. But I then replaced
> the "every" statement by the following one, which I thought to be more
> elegant:
>
> every retval := 8 * retval + ord(!s) - ord("0")
>
> Now the output of the program is 3 (the last digit), not 83.
Backtracking only goes as far as the generator !s. The expression
8 * retval
is not reeveluated. The original value of 0 is used in every
iteration.
Ken Walker, kwalker@premenos.sf.ca.us